﻿using System;
using System.Linq;

namespace DaveSexton.Labs.Tests.Category1.Console
{
	public sealed class UserInputKeysLab : BaseConsoleLab
	{
		protected override void Main()
		{
			TraceDescription("This is a lab for testing the SilverlightConsoleLab base class.");

			TraceLine("Press Enter alone to stop this lab.");

			foreach (var input in UserInputKeys("Key> ")
				.TakeWhile(input => input.Key != ConsoleKey.Enter))
			{
				TraceReplaceableLine("You entered: {0}", input.KeyChar);
			}
		}
	}
}